﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Xml.Linq;
using System.Data.SqlTypes;
using BizUserDALEntities;
using BizUserDAL;

namespace BizUser
{
    public partial class SelfRegister : System.Web.UI.Page
    {
        UserDAL iUSer = new UserDAL();
        protected void Page_Load(object sender, EventArgs e)
        {

        }

       // public static string SHA1(string strVal, )

        protected void Button3_Click(object sender, EventArgs e)

        {
            UserInfo oUserInfo = new UserInfo();

            oUserInfo.UserID = 10;
            oUserInfo.Password = txtPassword.Text.Trim();
            oUserInfo.ContactEmail = txtUserID.Text.Trim();

            oUserInfo.FirstName = txtFirstName.Text.Trim();
            oUserInfo.LastName = txtLastName.Text.Trim();

            oUserInfo.CityID = Convert.ToInt32(cmbCity.SelectedValue.Trim());
            oUserInfo.StateID = Convert.ToInt32(cmbState.SelectedValue.Trim());
            oUserInfo.CountryID = Convert.ToInt32(cmbCountry.SelectedValue.Trim());
            oUserInfo.Zip = txtZipCode.Text.Trim();

            oUserInfo.LicenseNumber = txtBrokerLicenseNumber.Text.Trim();
            oUserInfo.ContactMobilePhone = txtMobile.Text.Trim();
            oUserInfo.ContactOfficePhone = txtPhone.Text.Trim();

            oUserInfo.CreatedDT = DateTime.Now;
            oUserInfo.UpdatedDT = DateTime.Now;
            oUserInfo.LastLoginDateTime = DateTime.Now;

            oUserInfo.SecAnswer1 = txtSecA1.Text.Trim();
            oUserInfo.SecAnswer2 = txtSecA2.Text.Trim();
            oUserInfo.SecAnswer3 = txtSecA3.Text.Trim();

            oUserInfo.AddressLine1 = txtAddressLine1.Text.Trim();
            oUserInfo.AddressLIne2 = txtAddressLine2.Text.Trim();

            iUSer.SaveUserInfo(oUserInfo);

        }

        
    }
}